import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";

function _templateObject7() {
  var data = _taggedTemplateLiteral(["\n    ", "\n  "]);

  _templateObject7 = function _templateObject7() {
    return data;
  };

  return data;
}

function _templateObject6() {
  var data = _taggedTemplateLiteral(["\n  .themed-input-wrapper .themed-input-inner,\n  .ant-select,\n  .ant-cascader-picker,\n  .c7n-select.c7n-select.c7n-select {\n    ", ";\n  }\n\n  .ant-cascader-picker-disabled {\n    :after,\n    :before {\n      display: none !important;\n    }\n  }\n\n  .c7n-pro-icon-picker-wrapper,\n  .c7n-pro-calendar-picker-wrapper,\n  .c7n-pro-input-wrapper,\n  .c7n-pro-password-wrapper,\n  .c7n-pro-input-number-wrapper,\n  .c7n-pro-select-wrapper,\n  .c7n-pro-textarea-wrapper {\n    label {\n      ", ";\n      input {\n        z-index: 5;\n      }\n    }\n  }\n  .c7n-input-wrapper .c7n-input-content,\n  .c7n-input-wrapper.c7n-input-textarea .c7n-input-rendered-wrapper {\n    ", ";\n  }\n"]);

  _templateObject6 = function _templateObject6() {
    return data;
  };

  return data;
}

function _templateObject5() {
  var data = _taggedTemplateLiteral(["\n  .themed-input-wrapper .themed-input-inner,\n  .ant-select,\n  .ant-cascader-picker,\n  .c7n-select.c7n-select.c7n-select {\n    ", ";\n  }\n  .ant-cascader-picker-disabled {\n    :after,\n    :before {\n      display: none !important;\n    }\n  }\n  .themed-input-wrapper.t-field-focused .themed-input-inner {\n    :before,\n    :after {\n      display: block;\n    }\n  }\n  .c7n-pro-icon-picker-wrapper,\n  .c7n-pro-calendar-picker-wrapper,\n  .c7n-pro-input-wrapper,\n  .c7n-pro-password-wrapper,\n  .c7n-pro-input-number-wrapper,\n  .c7n-pro-select-wrapper,\n  .c7n-pro-textarea-wrapper {\n    label {\n      ", ";\n      input {\n        z-index: 5;\n      }\n    }\n  }\n  .c7n-input-wrapper .c7n-input-content,\n  .c7n-input-wrapper.c7n-input-textarea .c7n-input-rendered-wrapper {\n    ", ";\n  }\n"]);

  _templateObject5 = function _templateObject5() {
    return data;
  };

  return data;
}

function _templateObject4() {
  var data = _taggedTemplateLiteral(["\n  && {\n    background: none;\n  }\n  :after {\n    content: \"\";\n    position: absolute;\n    bottom: -1px;\n    height: 0;\n    border-bottom: 1px solid #4f7de7;\n    width: 100%;\n    left: 0;\n    transform-origin: center;\n    transform: scale(0);\n    transition: all 0.3s;\n  }\n  .t-field-focused .theme-input-inner:after,\n  :hover:after,\n  :focus-within:after {\n    transform: scale(1);\n    z-index: 2;\n  }\n"]);

  _templateObject4 = function _templateObject4() {
    return data;
  };

  return data;
}

function _templateObject3() {
  var data = _taggedTemplateLiteral(["\n  :after,\n  :before {\n    content: \"\";\n    display: none;\n    position: absolute;\n    left: -1px;\n    top: -1px;\n    right: -1px;\n    bottom: -1px;\n    animation-fill-mode: forwards;\n    z-index: 1;\n  }\n  :after {\n    border-bottom: 1px solid #4f7de7;\n    border-left: 1px solid #4f7de7;\n    animation: ", " linear;\n    animation-duration: 0.3s;\n  }\n\n  :before {\n    border-top: 1px solid #4f7de7;\n    border-right: 1px solid #4f7de7;\n    animation: ", " linear 0.3s;\n    animation-duration: 0.3s;\n  }\n  :hover,\n  :focus {\n    :after,\n    :before {\n      display: block;\n    }\n  }\n"]);

  _templateObject3 = function _templateObject3() {
    return data;
  };

  return data;
}

function _templateObject2() {
  var data = _taggedTemplateLiteral(["\n  0% {left: -1px; top: -1px; right: 100%; bottom: 100%;}\n  70% {left: -1px; top: -1px; right: -1px; bottom: 100%;}\n  100% {left: -1px; top: -1px; right: -1px; bottom: -1px;}\n"]);

  _templateObject2 = function _templateObject2() {
    return data;
  };

  return data;
}

function _templateObject() {
  var data = _taggedTemplateLiteral(["\n  0% {top: -1px; right: 100%; bottom: 100%; left: -1px;}\n  30% {top: -1px; left: -1px; right: 100%; bottom: -1px;}\n  100% {top: -1px; left: -1px; bottom: -1px; right: -1px;}\n"]);

  _templateObject = function _templateObject() {
    return data;
  };

  return data;
}

import { css, keyframes } from "styled-components";
import { getRequiredData } from "../../utils/utils";
var motion1 = keyframes(_templateObject());
var motion2 = keyframes(_templateObject2());
export var coreBorderAnimation = css(_templateObject3(), motion1, motion2);
var coreBottomScaleAnimation = css(_templateObject4());
export var borderCircleAnimation = css(_templateObject5(), coreBorderAnimation, coreBorderAnimation, coreBorderAnimation);
export var bottomScaleAnimation = css(_templateObject6(), coreBottomScaleAnimation, coreBottomScaleAnimation, coreBottomScaleAnimation);

var getBorderAndBottom = function getBorderAndBottom(props) {
  var _getRequiredData = getRequiredData(props, "input"),
      _getRequiredData$bord = _getRequiredData.border,
      border = _getRequiredData$bord === void 0 ? "" : _getRequiredData$bord;

  return border === "all" || border.length === 4 ? borderCircleAnimation : bottomScaleAnimation;
};

export default {
  border: borderCircleAnimation,
  bottom: bottomScaleAnimation,
  borderAndBottom: css(_templateObject7(), getBorderAndBottom)
};